package com.tongzhan.entity;

import com.tongzhan.annotation.ColumnDoc;
import com.tongzhan.annotation.PrimaryKey;
import com.tongzhan.annotation.TableDoc;
import com.tongzhan.base.BaseModel;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.time.LocalDateTime;

@TableDoc(table = "User",desc = "用户")
@Data
@Document(collection = "User")
public class User extends BaseModel {
    @Id
    private String _id;

    @PrimaryKey
    @Field("UserId")
    @ColumnDoc("id")
    private String userId;

    @Field("UserName")
    @ColumnDoc("用户名")
    private String userName;

    @Field("PassWord")
    @ColumnDoc("密码")
    private String passWord;

    @Field("RealName")
    @ColumnDoc("真实姓名")
    private String realName;

    @Field("StreetCode")
    @ColumnDoc("街道code")
    private String streetCode;

    @Field("StreetName")
    @ColumnDoc("街道名称")
    private String streetName;

    @Field("Duties")
    @ColumnDoc("职务")
    private String duties;

    @Field("Telephone")
    @ColumnDoc("联系电话")
    private String telephone;

    @Field("DutiesCode")
    @ColumnDoc("角色code")
    private String dutiesCode;

    @Field("SiteCode")
    @ColumnDoc("场所编码")
    private String siteCode;

    @Field("SiteName")
    @ColumnDoc("场所")
    private String siteName;

    @Field("ReligionCode")
    @ColumnDoc("教派编码")
    private String religionCode;

    @Field("ReligionName")
    @ColumnDoc("教派")
    private String religionName;

    @Field("VillageCode")
    @ColumnDoc("村社区code")
    private String villageCode;

    @Field("VillageName")
    @ColumnDoc("村社区")
    private String villageName;

    @Field("Picture")
    @ColumnDoc("图片")
    private String picture;//图片

    @Field("Appkey")
    @ColumnDoc("微信openid")
    private String appkey;//微信openid

    @Field("Type")
    @ColumnDoc("类型")
    private Integer type;//1-党派 2-侨台 3-乡贤 4-宗教 0-统战部 5-镇街道 6-村社区

    @Field("IsDelete")
    private Integer isDelete;//是否删除 0-否 1-是

    @Field("CreateTime")
    private LocalDateTime createTime;

    @Field("UpdateTime")
    private LocalDateTime updateTime;
}
